<!DOCTYPE html>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools,DatePicker,autocomplete"></t:base>
<div>
<div class="easyui-layout" fit="true">
  <div region="center" style="padding:0px;border:0px">
	   <t:datagrid name="sysAppNoticeList" checkbox="false" pagination="true" fitColumns="true" title="" sortName="id" actionUrl="sysAppNoticeController.do?datagrid" idField="id" fit="true" queryMode="group">
   <t:dgCol title="ID"  field="id"  hidden="true"  queryMode="group"  width="120"></t:dgCol>
   <t:dgCol title="公告编号"  field="noticeid"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="系统编号"  field="sysid"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="公告标题"  field="subject"  query="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="公告内容"  field="content" queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="公告时间"  field="postdate"  formatter="yyyy-MM-dd"  query="true"  queryMode="group"  width="120"></t:dgCol>
   <t:dgCol title="系统"  field="appid"  query="true"  queryMode="single"  dictionary="SYS_APP,appid,appname"  width="120"></t:dgCol>
   <t:dgCol title="排序"  field="orderid"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="背景图片"  field="image"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="是否有效"  field="isvalid"  query="true"  queryMode="single"  dictionary="ISN"  width="120"></t:dgCol>
   <t:dgToolBar title="录入" icon="icon-add" url="sysAppNoticeController.do?goAdd" funname="add"></t:dgToolBar>
	<t:dgToolBar title="编辑" icon="icon-edit" url="sysAppNoticeController.do?goUpdate" funname="update"></t:dgToolBar>
   <t:dgToolBar title="查看" icon="icon-search" url="sysAppNoticeController.do?goUpdate" funname="detail"></t:dgToolBar>
   <%-- <t:dgToolBar title="导入" icon="icon-put" funname="ImportXls"></t:dgToolBar>
   <t:dgToolBar title="导出" icon="icon-putout" funname="ExportXls"></t:dgToolBar>
   <t:dgToolBar title="批量删除"  icon="icon-remove" url="sysAppNoticeController.do?doBatchDel" funname="deleteALLSelect"></t:dgToolBar>
   <t:dgCol title="操作" field="opt" width="100"></t:dgCol>
   <t:dgDelOpt title="删除" url="sysAppNoticeController.do?doDel&id={id}" urlclass="ace_button"  urlfont="fa-trash-o"/>
   <t:dgToolBar title="模板下载" icon="icon-putout" funname="ExportXlsByT"></t:dgToolBar> --%>
  </t:datagrid>
  </div>
</div>
 <script type="text/javascript">
 		
		 //导出
		function ExportXls() {
			JeecgExcelExport("sysAppNoticeController.do?exportXls","sysAppNoticeList");
		}
 
	 	function fillData(rowData){ 
	 		//清空表单	
	 		$("#ff").form('clear');
	 		//填充数据
	 		for(var d in rowData){
				$("#"+d).val(rowData[d]);
			}
	 	};
 		$(function(){
	 	
 		 	$("#sysAppNoticeList").datagrid({
				onClickRow: function(rowIndex, rowData){
					fillData(rowData);
					$("#imgPath").html("<img src="+rowData.image+" style='height:150px;width:150px;'>")
					$("#conText").html(rowData.content);
					$("#appid").val(rowData.appid);
					$("#appid").attr("disabled","disabled");
					if (rowData.isvalid!=1) {
						$("#no").attr("checked",true);
					}else{
						$("#yes").attr("checked",true);
					}
					
				}
			});	

			 
		 	$("#ff").Validform({
				tiptype:1, 
				dragonfly:false,
				tipSweep:false,
				showAllError:false,
				postonce:true,
				ajaxPost:true
			}); 
 		});
 </script>
 <!--新提示方法改进   美化布局-------------------  -->  
 <style type="text/css">
 	.value{
 		padding: 10px auto 10px 10px;
 	}
 </style>
 	</div>
 	<div style="background-color: #5c9ccc;border: 1px solid #4297d7;">
 		<div style="text-align:center;background-color: #fff;width: 80px;margin-top: 10px;margin-left: 10px;font-size: 3px;padding:5px">
 			<span style="color: #e17009;">详细信息</span>
 		</div>
 	</div>
    <div title="新增数据" style="height:350px;background-color:#fff;overflow-y:auto;"  name="editPanel" id="editPanel"> 
		<t:formvalid formid="ff" dialog="true" layout="table" tiptype="4" action="">
			<input name="id" id="id" type="hidden" value="" /> 
			<table style="width: 600px;margin-bottom:75px" cellpadding="0" cellspacing="1" class="">
				<tbody>
					<tr>
						<td align="right">
							<label class="Validform_label">
								公告编号:
							</label>
						</td>
						<td class="value">
						     <input id="noticeid" name="noticeid"  readonly="true" type="text" style="width: 100%;" class="" value="">
						</td>
					</tr>
					<tr>
						<td align="right">
							<label class="Validform_label">
								主题:
							</label>
						</td>
						<td class="value">
						     <input id="subject" name="subject"  readonly="true" type="text" style="width: 100%;" class="" value="">
						</td>
					</tr>
					<tr>
						<td align="right">
							<label class="Validform_label">
								内容:
							</label>
						</td>
						<td class="value" id="conText" style="border:1px solid #D7D7D7;margin: 3px">
						</td>
					</tr>
					<tr>
						<td align="right">
							<label class="Validform_label">
								公告时间:
							</label>
						</td>
						<td class="value">
						     <input id="postdate" name="postdate"  readonly="true" type="text" style="width: 100%;" class="" value="">
						</td>
					</tr>
					<tr>
						<td align="right">
							<label class="Validform_label">
								背景图片:
							</label>
						</td>
						<td class="value" id="imgPath">
						</td>
					</tr>
					<tr>
						<td align="right">
							<label class="Validform_label">
								系统:
							</label>
						</td>
						<td class="value">
							<t:dictSelect id="appid" field="appid" type="list"  dictTable="SYS_APP" dictField="appid" dictText="appname"  hasLabel="false"  title="系统" ></t:dictSelect>
						</td>
						<td align="right">
							<label class="Validform_label">
								排序:
							</label>
						</td>
						<td class="value">
							<input id="orderid" name="orderid"  readonly="true" type="text" style="width: 150px;" class="" value="">
						</td>
					</tr>
					<tr>
						<td align="right">
							<label class="Validform_label">
								是否有效:
							</label>
						</td>
						<td class="value">
							<input id="yes" readonly="true" type="radio" value="有效">有效
							<input id="no" readonly="true" type="radio" value="无效">无效
						</td>
					</tr>
				</tbody>
			</table>
		
		</t:formvalid>
    </div>